home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / FLOPPY / 61WIN / disk1 / data1.cab / Help_Files / serial.txt
Text File  |  2001-03-02  |  5KB  |  137 lines

  1. READIO/WRITEIO Registers
  2.  
  3. The following tables document the READIO and WRITEIO registers available with
  4. the Serial drivers. The 16-bit or 32-bit Windows Programmer's Reference
  5. books or CD-ROM's are essential for understanding these functions.
  6.  
  7.      HTBasic/Windows SERIAL READIO/WRITEIO Registers
  8.  
  9. Reg. Windows                       Description
  10. no.  element
  11. ---- ----------------------------  -----------------------
  12.  1   DCB.BaudRate                  baud rate
  13.  
  14.  2   *(USHORT *)(&DCB+12) [16-bit] flags
  15.           &h 0001             fBinary
  16.           &h 0002             fRtsDisable
  17.           &h 0004             fParity
  18.           &h 0008             fOutXCtsFlow
  19.           &h 0010             fOutxDsrFlow
  20.           &h 0060             unused
  21.           &h 0080             fDtrDisable
  22.           &h 0100             fOutX
  23.           &h 0200             fInX
  24.           &h 0400             fPeChar
  25.           &h 0800             fNull
  26.           &h 1000             fChEvt
  27.           &h 2000             fDtrFlow
  28.           &h 4000             fRtsFlow
  29.           &h 8000             unused
  30.      *(USHORT *)(&DCB+8) [32-bit]  flags
  31.           &h 0001             fBinary
  32.           &h 0002             fParity
  33.           &h 0004             fOutxCtsFlow
  34.           &h 0008             fOutxDsrFlow
  35.           &h 0030             fDtrControl
  36.              0000        DTR_CONTROL_DISABLE
  37.              0010        DTR_CONTROL_ENABLE
  38.              0020        DTR_CONTROL_HANDSHAKE
  39.           &h 0040             fDsrSensitivity
  40.           &h 0080             fTXContinueXonXoff
  41.           &h 0100             fOutX
  42.           &h 0200             fInX
  43.           &h 0400             fErrorChar
  44.           &h 0800             fNull
  45.           &h 3000             fRtsControl
  46.              0000        RTS_CONTROL_DISABLE
  47.              1000        RTS_CONTROL_ENABLE
  48.              2000        RTS_CONTROL_HANDSHAKE
  49.              3000        RTS_CONTROL_TOGGLE
  50.           &h 4000             fAbortOnError
  51.  
  52.  5   DCB.XonLim               XON limit
  53.  
  54.  6   DCB.XoffLim              XOFF limit
  55.  
  56.  7   DCB.ByteSize             bytes/char.
  57.  
  58.  8   DCB.Parity               parity
  59.           &h 00          NOPARITY
  60.           &h 01          MARKPARITY
  61.           &h 02          EVENPARITY
  62.           &h 03          ODDPARITY
  63.           &h 04          SPACEPARITY
  64.  
  65.  9   DCB.StopBits             stop bits
  66.           &h 00          ONESTOPBIT
  67.           &h 01          ONE5STOPBITS
  68.           &h 02          TWOSTOPBITS
  69.  
  70. 10   DCB.XonChar              XON char.
  71.  
  72. 11   DCB.XoffChar             XOFF char.
  73.  
  74.  
  75. 12   DCB.PeChar [16-bit]      error replacement char.
  76.      DCB.ErrorChar [32-bit]
  77.  
  78. 13   DCB.EofChar              EOF char.
  79.  
  80. 14   DCB.EvtChar              received event char.
  81.  
  82. 15   DCB.RlsTimeout [16-bit]  RLS timeout
  83.      0 [32-bit]
  84.  
  85. 16   DCB.CtsTimeout [16-bit]  CTS timeout
  86.      0 [32-bit]
  87.  
  88. 17   DCB.DsrTimeout [16-bit]  DSR timeout
  89.      0 [32-bit]
  90.  
  91.      HTBasic/Windows SERIAL WRITEIO Only Register
  92.  
  93. Reg. Windows                       Description
  94. no.  element
  95. ---- ----------------------------  -----------------------
  96. 20   fdwFunction              EscapeCommFunction() arg.
  97.           1              SETXOFF
  98.           2              SETXON
  99.           3              SETRTS
  100.           4              CLRRTS
  101.           5              SETDTR
  102.           6              CLRDTR
  103.  
  104.  
  105.      HTBasic/Windows SERIAL READIO Only Registers
  106.  
  107. Reg. Windows                       Description
  108. no.  element
  109. ---- ----------------------------  -----------------------
  110. 30   COMSTAT.status                buffer status
  111.      COMSTAT.status, lower 16 bits [32-bit]
  112.           &h 0001             fCtsHold
  113.           &h 0002             fDsrHold
  114.           &h 0004             fRlsdHold
  115.           &h 0008             fXoffHold
  116.           &h 0010             fXoffSent
  117.           &h 0020             fEof
  118.           &h 0040             fTxim
  119.  
  120. 31   CMSTAT.cbInQue                input buffer # chars.
  121.  
  122. 32   COMSTAT.cbOutQue              output buffer # chars.
  123.  
  124. 33   Errors                        output of ClearCommError().
  125.           &H 0001             CE_RXOVER      Receive Queue overflow
  126.           &h 0002             CE_OVERRUN     Receive Overrun Error
  127.           &h 0004             CE_RXPARIT     Receive Parity Error
  128.           &h 0008             CE_FRAME       Receive Framing error
  129.           &h 0010             CE_BREAK       Break Detected
  130.           &h 0100             CE_TXFULL      TX Queue is full
  131.           &h 8000             CE_MODE        Mode unsupported
  132.  
  133. 40   ModemStats [32-bit only]      GetCommModemStats() arg.
  134.           &h 0010             MS_CTS_ON
  135.           &h 0020             MS_DSR_ON
  136.           &h 0040             MS_RING_ON
  137.           &h 0080             MS_RLSD_ON